package com.cea.papyrus.core.treeeditpart.pseudoelement;

import java.util.Collection;

import org.eclipse.uml2.uml.BehavioredClassifier;

/**
 * Pseudo element for grouping behaviors tree edit part 
 */
public class BehavioredClassifierBehaviorsGroup implements IBehaviorsGroup {
	
	/** parent {@link BehavioredClassifier} */
	protected BehavioredClassifier parent;
	
	/**
	 * Creates a new BehavioredClassifierBehaviorsGroup
	 * @param parent the {@link BehavioredClassifier} of this behaviors group
	 */
	public BehavioredClassifierBehaviorsGroup(BehavioredClassifier parent) {
		this.parent = parent;
	}
	
	/**
	 * Returns the {@link BehavioredClassifier} that owns the behaviors
	 * @return the {@link BehavioredClassifier} that owns the behaviors
	 */
	public BehavioredClassifier getBehavioredClassifier(){
		return parent;
	}
	
	/**
	 * {@inheritDoc}
	 */
	public Collection getBehaviors() {
		return getBehavioredClassifier().getOwnedBehaviors();
	}
}